package com.ssh.service;

import com.ssh.dao.EmployeeDAO;
import com.ssh.pojo.Employee;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeService {

    @Autowired
    private EmployeeDAO employeeDAO;

    public void addEmployee(Employee employee) {
        employeeDAO.addEmployee(employee);
    }

    public List<Employee> getEmpList(DetachedCriteria criteria) {
        return employeeDAO.getEmpList(criteria);
    }
}
